using System;
using System.Data.Entity.ModelConfiguration;
using System.Data.Common;
using System.Data.Entity;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using DomainLayer.Data.Entities;

namespace Infrastructure.Data.Mapping
{
	public class WaybillSignInfoMap : EntityTypeConfiguration<WaybillSignInfo>
	{
		public WaybillSignInfoMap()
		{
			// Primary Key
			this.HasKey(t => t.WaybillSignInfoID);

			// Properties
			this.Property(t => t.SignCustomer)
				.HasMaxLength(50);
				
			this.Property(t => t.SignStatus)
				.HasMaxLength(20);
				
			this.Property(t => t.SignDescription)
				.HasMaxLength(20);
				
			this.Property(t => t.SignReason)
				.HasMaxLength(200);
				
			this.Property(t => t.AcceptType)
				.HasMaxLength(20);
				
			this.Property(t => t.DeductNotes)
				.HasMaxLength(20);
				
			// Table & Column Mappings
			this.ToTable("WaybillSignInfo");
			this.Property(t => t.WaybillSignInfoID).HasColumnName("WaybillSignInfoID");
			this.Property(t => t.WaybillNO).HasColumnName("WaybillNO");
			this.Property(t => t.SignType).HasColumnName("SignType");
			this.Property(t => t.SignCustomer).HasColumnName("SignCustomer");
			this.Property(t => t.SignTime).HasColumnName("SignTime");
			this.Property(t => t.SignStatus).HasColumnName("SignStatus");
			this.Property(t => t.SignDescription).HasColumnName("SignDescription");
			this.Property(t => t.SignReason).HasColumnName("SignReason");
			this.Property(t => t.AcceptType).HasColumnName("AcceptType");
			this.Property(t => t.TransferFee).HasColumnName("TransferFee");
			this.Property(t => t.NeedAmount).HasColumnName("NeedAmount");
			this.Property(t => t.FactAmount).HasColumnName("FactAmount");
			this.Property(t => t.Amount).HasColumnName("Amount");
			this.Property(t => t.PaidAmount).HasColumnName("PaidAmount");
			this.Property(t => t.NeedBackAmount).HasColumnName("NeedBackAmount");
			this.Property(t => t.FactBackAmount).HasColumnName("FactBackAmount");
			this.Property(t => t.DinsureFee).HasColumnName("DinsureFee");
			this.Property(t => t.PackFee).HasColumnName("PackFee");
			this.Property(t => t.BackStationInofID).HasColumnName("BackStationInofID");
			this.Property(t => t.DeductNotes).HasColumnName("DeductNotes");
			this.Property(t => t.CreatBy).HasColumnName("CreatBy");
			this.Property(t => t.CreatStation).HasColumnName("CreatStation");
			this.Property(t => t.CreatTime).HasColumnName("CreatTime");
			this.Property(t => t.UpdateBy).HasColumnName("UpdateBy");
			this.Property(t => t.UpdateTime).HasColumnName("UpdateTime");
			this.Property(t => t.UpdateStation).HasColumnName("UpdateStation");
			this.Property(t => t.IsDelete).HasColumnName("IsDelete");
			this.Property(t => t.ReturnCash).HasColumnName("ReturnCash");
			this.Property(t => t.FinancialStatus).HasColumnName("FinancialStatus");
			this.Property(t => t.FinancialTime).HasColumnName("FinancialTime");
			this.Property(t => t.PackageCount).HasColumnName("PackageCount");
		}
	}
}

